Skip to content

Make repoPathRegex more permissive.#4439

Merged
mstange merged 1 commit into
firefox-devtools:mainfrom
mstange:permissive-regex-for-git-rev
Jan 23, 2023
Merged

Make repoPathRegex more permissive.#4439
mstange merged 1 commit into
firefox-devtools:mainfrom
mstange:permissive-regex-for-git-rev

Conversation

@mstange

@mstange mstange commented Jan 20, 2023

Copy link
Copy Markdown
Contributor

It will now accept "revisions" which are git tag names. For example: git:github.com/torvalds/linux:arch/x86/mm/fault.c:v5.15
In this example, the tag name / "revision" is "v5.15". The CORS-URL for this file would then be
https://raw.githubusercontent.com/torvalds/linux/v5.15/arch/x86/mm/fault.c

I'm not planning to use this capability, but maybe it'll be useful for somebody at some point.

I was initially planning to use it for kernel sources in samply, but then I noticed that Ubuntu has its own patches on top of the original kernel source, so I'll need to get the source from somewhere else after all.

@codecov

codecov Bot commented Jan 20, 2023

Copy link
Copy Markdown

Codecov Report

Base: 88.55% // Head: 88.55% // No change to project coverage 👍

Coverage data is based on head (77886a3) compared to base (af74680).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4439   +/-   ##
=======================================
  Coverage   88.55%   88.55%           
=======================================
  Files         283      283           
  Lines       25533    25533           
  Branches     6879     6879           
=======================================
  Hits        22611    22611           
  Misses       2715     2715           
  Partials      207      207           
Impacted Files Coverage Δ
src/utils/special-paths.js 91.48% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

It will now accept "revisions" which are git tag names. For example:
git:github.com/torvalds/linux:arch/x86/mm/fault.c:v5.15
In this example, the tag name / "revision" is "v5.15".
The CORS-URL for this file would then be
https://raw.githubusercontent.com/torvalds/linux/v5.15/arch/x86/mm/fault.c
@mstange mstange force-pushed the permissive-regex-for-git-rev branch from 79bf65a to 77886a3 Compare January 23, 2023 19:34

@canova canova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

I was initially planning to use it for kernel sources in samply, but then I noticed that Ubuntu has its own patches on top of the original kernel source, so I'll need to get the source from somewhere else after all.

Ah, that's unfortunate. But still it could be useful for other people or for us in the future for something else.

@mstange mstange merged commit 9c1b61b into firefox-devtools:main Jan 23, 2023
@mstange

mstange commented Jan 23, 2023

Copy link
Copy Markdown
Contributor Author

I did actually find another use for this: The symbolication response from a local samply load server can contain file paths such as git:github.com/baldurk/renderdoc:renderdoc/data/glsl/gl_texsample.h:v1.15, from Renderdoc symbol files which contain github URLs, e.g. https://raw.githubusercontent.com/baldurk/renderdoc/v1.15/renderdoc/data/glsl/gl_texsample.h

@canova canova mentioned this pull request Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants